<?php
$ro = isset($ro) ? true : false; // read only ?
?>

<div id="notinstock" style="display:none"><?php echo __('not in stock') ?></div>
<div class="tabeltop">

	<div class="tabeltopmenu">
		<div class="tabeltopmenulink topt">
			<p><?php echo __('toode') ?></p>
		</div>
		<div class="tabeltopmenulink topkogus">
			<p><?php echo __('kogus') ?></p>
		</div>
		<div class="tabeltopmenulink lasttop">
			<p><?php echo __('hind') ?></p>
		</div>
		<div class="clear"></div>
	</div>
</div>
<?php foreach($products as $product): ?>
<div class="tablerow">
	<div class="timg"><a href="#"><img src="<?php echo myPicture::getInstance($product->getPic())->thumbnail(73,79, 'fit')->url() ?>" width="73" height="79" alt=""/></a></div>
	<div class="tinfo">
		<p class="namelink"><a href="#"><?php echo $product->getName() ?></a></p>
	</div>
	<div class="tkogus qty">
		<?php if(!$ro): ?>
		<div class="minus">
			<a href="#"><img src="/enermaatik/img/transparent.png" width="20" height="20" alt=""/></a>
		</div>
		<?php endif; ?>
		<div class="kogusform">
				<div class="formleft"><img src="/enermaatik/img/formleft.png" width="10" height="30" alt=""/></div>
				<div class="formcenter">
					<input alt="<?php echo $product->getInstock() ?>" readonly class="kogus qtyinput" id="qtyinput_<?php echo $product->getId() ?>" type="text" value="<?php echo $product->getQty() ?>" name="product[<?php echo $product->getId() ?>]" maxlength="2" />
				</div>
				<div class="formright"><img src="/enermaatik/img/formright.png" width="10" height="30" alt=""/></div>
			<div class="clear"></div>
		</div>
		<?php if(!$ro): ?>
		<div class="pluss">
			<a href="#"><img src="/enermaatik/img/transparent.png" width="20" height="20" alt=""/></a>
		</div>
		<?php endif; ?>
		<div class="clear"></div>
	</div>
	<div class="thind">
		<h1><?php echo price_format($product->getPrice()) ?></h1>
		<p><?php echo price_format($product->getPrice(), 'EUR') ?></p>
	</div>
	<?php if(!$ro): ?>
	<div class="status">
		<p><a href="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE_ACTIONS)->link(null, array('module' => 'basketPage', 'action' => 'deleteFromBasket', 'productID' => $product->getId())) ?>"><?php echo __('eemalda') ?></a></p>
	</div>
	<?php endif; ?>
	<div class="clear"></div>
</div>
<?php endforeach; ?>